import os

class Config:
    """系统配置类"""
    # Flask配置
    SECRET_KEY = os.getenv('SECRET_KEY', 'dev-secret-key-change-in-production')
    UPLOAD_FOLDER = 'uploads'
    MAX_CONTENT_LENGTH = 16 * 1024 * 1024  # 16MB
    
    # 模型配置
    NER_MODEL_NAME = "dslim/bert-base-NER"
    
    # 警报配置
    ALERT_WEBHOOK_URL = os.getenv('ALERT_WEBHOOK_URL', '')
    EMAIL_ENABLED = os.getenv('EMAIL_ENABLED', 'false').lower() == 'true'
    
    # 日志配置
    LOG_FILE = 'logs/detection.log'
    
    # 允许的文件类型
    ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif', 'txt', 'pdf'}

